#!/bin/bash
LocalHour=$(date +%H)
LocalMinute=$(date +%M)
LocalWeek=$(date +%w)
if [ $LocalHour -ge 6 ] && [ $LocalHour -le 21 ];then
	if [ $LocalHour -eq 6 ] && [ $LocalMinute -le 45 ];then
		~/.local/bin/toopen-bell 1
		for i in {1..10}
		do
			~/.local/bin/toopen-talkable -t 大懒虫快起床了！大懒虫起床了！
			sleep 20
		done
	elif [ $LocalHour -eq 6 ] && [ $LocalMinute -ge 45 ];then
		~/.local/bin/toopen-bell 1
		~/.local/bin/toopen-talkable -t 新的一天开始了！不要松懈哦！ 
	elif [ $LocalHour -eq 7 ] && [ $LocalMinute -lt 45 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 多儿催你学英语了，多儿催你学英语了！ 
	elif [ $LocalHour -eq 7 ] && [ $LocalMinute -ge 45 ] && [ $LocalWeek -ne 6 ] && [ $LocalWeek -ne 0 ]; then
		~/.local/bin/toopen-talkable -t 兜兜上学啦，兜兜上学啦！
	elif [ $LocalHour -eq 8 ] && [ $LocalMinute -lt 45 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 该吃饭了，今天早上吃点什么好呢！
	elif [ $LocalHour -eq 12 ] && [ $LocalMinute -lt 45 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 该吃饭了，今天中午吃点什么好呢？
	elif [ $LocalHour -eq 16 ] && [ $LocalMinute -lt 45 ] && [ $LocalWeek -ne 6 ] && [ $LocalWeek -ne 0 ]; then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 兜兜放学了，兜兜放学了！
	elif [ $LocalHour -eq 18 ] && [ $LocalMinute -lt 45 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 该吃饭了，今天晚上吃点什么好呢？
	elif [ $LocalHour -eq 19 ] && [ $LocalMinute -lt 45 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 该洗漱了，再不洗就臭了！
	elif [ $LocalMinute -eq 00 ];then
		~/.local/bin/toopen-bell 2
		~/.local/bin/toopen-talkable -t 开始干活了，开始干活了！
	elif [ $LocalMinute -ge 45 ];then
		~/.local/bin/toopen-bell 3
		~/.local/bin/toopen-talkable -t 时间不多了，抓紧完成哦！
	else
		echo "判断出错"
	fi
elif [ $LocalHour -eq 22 ] && [ $LocalMinute -lt 45 ];then
	~/.local/bin/toopen-bell 4
	~/.local/bin/toopen-talkable -st 熄灯时间到了，早睡早起身体好！
else
	echo "睡觉时间"
fi
